import { lazy } from "react";
import {Navigate} from 'react-router-dom'
const Home=lazy(()=>import('../pages/home'))
const Index=lazy(()=>import('../pages/index'))
const Order=lazy(()=>import('../pages/order'))
const My=lazy(()=>import('../pages/my'))
export const menu=[
    {
        path:'/home/index',
        element:<Index/>,
        title:'首页',
    },
    {
        path:'/home/order',
        element:<Order/>,
        title:'订单',
    },
    {
        path:'/home/my',
        element:<My/>,
        title:'我的',
    },
]
const router=[
    {
        path:'/',
        element:<Navigate to="/home"></Navigate>
    },
    {
        path:'/home',
        element:<Home/>,
        children:menu
    }
]
export default router